package org.example.demo2.temp.model.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import edu.yngsxy.wkstudy.core.model.entity.WkBaseEntity;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;
import lombok.experimental.Accessors;

import java.io.Serializable;
import jakarta.validation.constraints.*;
import io.swagger.v3.oas.annotations.media.Schema;
/**
 * <p>
 * 用户：存储系统用户信息
 * </p>
 *
 * @author qyc
 * @since 2025-09-08
 */
@Getter
@Setter
@ToString
@TableName("sys_user")
@Accessors(chain = true)
@Schema(description = "用户：存储系统用户信息")
public class SysUser extends WkBaseEntity {

    private static final long serialVersionUID = 1L;

    /**
     * 用户名
     */
    @TableField("username")
    @Schema(title = "username", description = "username", requiredMode =Schema.RequiredMode.REQUIRED)
    @NotBlank(message = "username不能为空")
    @Size(max = 20, message = "username长度不能超过20个字符")
    private String username;

    /**
     * 真实姓名
     */
    @TableField("truename")
    @Schema(title = "truename", description = "truename", requiredMode =Schema.RequiredMode.NOT_REQUIRED)
    @Size(max = 20, message = "truename长度不能超过20个字符")
    private String truename;

    /**
     * 密码
     */
    @TableField("password")
    @Schema(title = "password", description = "password", requiredMode =Schema.RequiredMode.REQUIRED)
    @NotBlank(message = "password不能为空")
    @Size(max = 60, message = "password长度不能超过60个字符")
    private String password;

    /**
     * 邮箱
     */
    @TableField("email")
    @Schema(title = "email", description = "email", requiredMode =Schema.RequiredMode.NOT_REQUIRED)
    @Size(max = 50, message = "email长度不能超过50个字符")
    private String email;

    /**
     * 简介
     */
    @TableField("intro")
    @Schema(title = "intro", description = "intro", requiredMode =Schema.RequiredMode.NOT_REQUIRED)
    @Size(max = 500, message = "intro长度不能超过500个字符")
    private String intro;

    /**
     * 头像
     */
    @TableField("photo")
    @Schema(title = "photo", description = "photo", requiredMode =Schema.RequiredMode.NOT_REQUIRED)
    @Size(max = 500, message = "photo长度不能超过500个字符")
    private String photo;
}
